package o;

import android.util.Log;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

@RequiresApi(19)
class oh extends oo {
    private static Method ˊ;
    private static boolean ˋ;
    private static Method ˎ;
    private static boolean ˏ;

    oh() {
    }

    public void ˋ(@NonNull View view, float f) {
        ˏ();
        if (ˊ != null) {
            try {
                ˊ.invoke(view, new Object[]{Float.valueOf(f)});
                return;
            } catch (IllegalAccessException e) {
                return;
            } catch (InvocationTargetException e2) {
                throw new RuntimeException(e2.getCause());
            }
        }
        view.setAlpha(f);
    }

    public float ॱ(@NonNull View view) {
        ˊ();
        if (ˎ != null) {
            try {
                return ((Float) ˎ.invoke(view, new Object[0])).floatValue();
            } catch (IllegalAccessException e) {
            } catch (InvocationTargetException e2) {
                throw new RuntimeException(e2.getCause());
            }
        }
        return super.ॱ(view);
    }

    public void ˊ(@NonNull View view) {
    }

    public void ˎ(@NonNull View view) {
    }

    private void ˏ() {
        if (!ˏ) {
            try {
                ˊ = View.class.getDeclaredMethod("setTransitionAlpha", new Class[]{Float.TYPE});
                ˊ.setAccessible(true);
            } catch (Throwable e) {
                Log.i("ViewUtilsApi19", "Failed to retrieve setTransitionAlpha method", e);
            }
            ˏ = true;
        }
    }

    private void ˊ() {
        if (!ˋ) {
            try {
                ˎ = View.class.getDeclaredMethod("getTransitionAlpha", new Class[0]);
                ˎ.setAccessible(true);
            } catch (Throwable e) {
                Log.i("ViewUtilsApi19", "Failed to retrieve getTransitionAlpha method", e);
            }
            ˋ = true;
        }
    }
}
